package com.itheima.service;

import com.itheima.entity.PageResult;
import com.itheima.entity.QueryPageBean;
import com.itheima.pojo.User;

import java.util.List;

public interface UserService {
    public User findByUsername(String username);

    //分页查询
    PageResult pageQuery(QueryPageBean queryPageBean);

    User findById(Integer id);

    //根据用户id查询角色id
    List<Integer> findRoleIdByUserId(Integer id);

    //添加用户
    void add(User user, Integer[] roles);

    //编辑
    void edit(User user, Integer[] roles);

    //删除
    void delete(Integer id);
}
